package code.snippet

import net.liftweb._
import http._
import js._
import JsCmds._
import JE._
import net.liftweb.util._
import Helpers._

class UserInfo {

  import code.comet.ChatServer
  private var firstName = ""
  private var age = ""

  def render = {
    //ChatServer ! (S.session, s)
    "#user_name " #> SHtml.onSubmit(n => {
      firstName = n
      SetValById("user_name", "")
      S.notice("+++++++++++++++++++++ %s".format(firstName))
    }) &
      "#user_age " #> SHtml.onSubmit(a => {
        age = a
        SetValById("user_age", "")
        S.notice("+++++++++++++++++++++ %s".format(age))
      })
  }
}
